<?php
/**
 * @var $models array of Article
 * @var $model Article
 */
?>
<h2 class="title"><?php echo $this->title; ?></h2>
<div class="services clearfix">
<?php if(count($models)) :?>
    <?php $i=1; foreach ($models as $model) : $detailUrl = Yii::app()->createUrl('/Article/default/view',array('cat_id'=>$model->category_id,'locale'=>$model->localeArticle->locale,'id'=>$model->localeArticle->article_id,'alias'=>$model->localeArticle->alias)); ?>
    <div class="item">
        <a href="<?php echo $detailUrl; ?>"><img class="service-img" src="<?php echo image_path($model->image); ?>" alt="<?php echo strip_tags($model->localeArticle->title); ?>" /></a>
        <h3><a href="<?php echo $detailUrl; ?>"><?php  echo $model->localeArticle->title;?></a></h3>
        <p><?php echo firstWordsExt(strip_tags($model->localeArticle->content),$this->contentLimited);?></p>
    </div>
    <?php if($i%2==0):?>
        <br class="clear" />
    <?php $i++; endif;?>
 <?php endforeach;?>
<?php else : ?>
<?php echo $this->emptyText;?>
<?php endif;?>
</div>